{extend name="personal_others/index" /}

{block name="center"}
 <link rel="stylesheet" href="static/css/personal_rizhi/my.css">

     <link rel="stylesheet" href="static/smalledit/lib/css/jquery.mCustomScrollbar.min.css"/>
    <link rel="stylesheet" href="static/smalledit/dist/css/jquery.emoji.css"/>
    <link rel="stylesheet" href="static/smalledit/lib/css/railscasts.css"/>
    <link rel="stylesheet" href="static/smalledit/dist/css/index.css"/>

    <script src="static/smalledit/lib/script/jquery.min.js"></script>
    <script src="static/smalledit/lib/script/highlight.pack.js"></script>
    <script src="static/smalledit/lib/script/jquery.mousewheel-3.0.6.min.js"></script>
    <script src="static/smalledit/lib/script/jquery.mCustomScrollbar.min.js"></script>
    <script src="static/smalledit/dist/js/jquery.emoji.min.js"></script>

   <div class="plc_main">
    <!--右侧开始-->
    <div class="main_cont">
     <div class="path_title">
      <span class="blog_title">宠日志<em class="blog_path">&gt;&gt; 当前日记</em></span>
      <a class="return" href="indexPersonalOthersOrizhi?id={$ouserList.id}" title="返回日志首页&gt;&gt;">返回日记首页&gt;&gt;</a>
     </div>


     <div class="blog_main">
      <div class="title_article">
       <h2>{$orizhiList.rz_title}</h2>
       <div class="info">
        <span class="date">{$orizhiList.rz_time}</span>
       </div>
      </div>
      <div class="blog_content">
       <p>{$orizhiList.rz_content}</p>
      </div>
      <div class="stat_info">
       <div class="bqinfo">
        <span class="wline">|</span>阅读({$orizhiList.rz_read})
        <span class="wline">|</span>
        <span class="bqplwe">评论({$orizhiList.rz_pinglun})</span>
       </div>
       <div id="bdsharrzs">
       </div>
      </div>
      <div class="blog_comment">
       <a name="bpl"></a>
       <!--评论列表开始-->
       <div class="comment_list" id="commentlist" style="max-height:1000px;width:530px; overflow: auto;">
    
        {volist name="orzreply" id="vo"}
          <dl class="viw">
            <dt unm="豪雅" uid="1566465" cid="43">
              <a href="javascript:void(0);">
                {empty name="vo['icon']"}
                <img style="width:50px;" src="static/image/personal/head6.jpg">
                {else /}
                <img src="uploads/{$vo.icon}" width="50" height="50">
                {/empty}
                
              </a>
            </dt>
            <dd>
              {if condition="$vo.use_id eq $Think.session.user.id"} <a href="indexPersonalIndex">
              {else /} <a href="indexPersonalOthersIndex?id={$vo.use_id}" target="_blank">
              {/if}
              
                {$vo.nickname}
              </a>
              ： {$vo.rz_content}
              <p class="info tr">
                <span class="date">
                  {$vo.rz_time}
                </span>
              </p>
            </dd>
          </dl>
          {/volist}

       </div>
       <!--评论列表结束-->
       <!--分页开始-->
       <div class="page_wrap page_wrap2">
        <div class="showpage"></div>
       </div>
       <!--分页结束-->
       <a name="reply"></a>
       <!--评论输入框开始-->
       <form action="">
        <div class="row firstRow">
          <div class="col-md-6">
              <h4>评论内容:</h4>
              <div id="editor" contenteditable="true" style="height:60px"></div>
              <!-- <div class="m-t-70"></div> -->
          </div>
        </div>
       <div class="send_fun" id="send_ajax">
        <div class="pub" style="margin-right: 82px">
         <a class="submit_btn" href="javascript:void(0);" id="rep_submit">评论</a>
         <input type="hidden" id="rz_id" name="rz_id" value="{$orizhiList.id}" />
         <input type="hidden" id="rz_content" name="rz_content" value="" />
        
        </div>
       </div>
       </form>
       <!--评论输入框结束-->
      </div>
     </div>



    </div>
    <!--右侧结束-->
   </div>



   <div id="modal-overlay"> 
  <div class="modal-data">    
      <p>确定要删除该日记吗？日记中的图片也将从相册中删除，删除后不可恢复 </p>
      <button type="button" class="btn cancel_btn" data-dismiss="modal" onclick="overlay()">取消</button>
      <button type="button" id="sure" class="btn submit_btn" index="a">确定</button>

  </div>
</div>
  
  <script>


      //评论
      $('#rep_submit').click(function(){

            var content = $('#editor').html();
            $('#rz_content').attr('value',content);
            var info = $('#send_ajax :input').serialize();
            $.ajax({
            type: 'get',
            url: "indexPersonalRizhiAddreply",
            data: info,
            dataType:'json',
            success: function(data){
              if(data){
                $('#commentlist').prepend("<dl class='viw'><dt><a href='javascript:void(0);'><img src='uploads/"+data['icon']+"' width='50' height='50'></a></dt><dd><a href='javascript:void(0);'>"+data['nickname']+"</a>： "+data['rz_content']+"<p class='info tr'><span class='date'>"+data['rz_time']+"</span></p></dd></dl>");
                
              }
            }
        });
      })



       hljs.initHighlightingOnLoad();
          $("#editor").emoji({
          icons: [{
              name: "QQ表情",
              path: "static/smalledit/dist/img/qq/",
              maxNum: 91,
              excludeNums: [41, 45, 54],
              file: ".gif",
              placeholder: "#qq_{alias}#"
          }]
      });



  </script>
  {/block}
